package com.dlx.mem.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dlx.mem.service.MemLevelService;
import com.dlx.model.mem.MemLevel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author nglon
 * @since 2021-11-08
 */
@RestController
@RequestMapping("/admin/mem/level")
public class MemLevelController {

    @Autowired
    private MemLevelService memLevelService;

    @GetMapping("inner/getById/{id}")
    public MemLevel getById(@PathVariable("id") Long id){
        return this.memLevelService.getById(id);
    }

    @GetMapping("inner/getLevelList")
    public List<MemLevel> getLevelList(){
        return this.memLevelService.getBaseMapper().selectList(new QueryWrapper<>());
    }
}

